Currently, virtualization technologies are widely applied in the field of information technologies. A virtualization technology provides a capability of deploying a plurality of virtual machines onto one server, which reduces overall costs of a user and improves reliability and flexibility of applications. Currently, CPU overcommitment is universally implemented for management of central processing units (CPUs) of virtual machines in the industry, that is, the number of virtual CPUs of virtual machines is larger than the number of physical CPUs in a server, to fully use physical resources. However, in a case in which physical resources are short, how to allocate physical CPU resources appropriately becomes one of the biggest problems that are encountered. A commonly used implementation manner is to set priorities for the virtual machines, and allocate different quotas of CPU resources to the virtual machines according to different priorities. A higher quota of physical CPU resources is allocated to a virtual machine of a higher priority, to provide different service for users with different requirements and improve quality of service.
Because physical CPU resources are allocated to virtual machines according to priorities, a virtual machine of a higher priority may occupy a dominant position and a virtual machine of a lower priority is unable to obtain a physical CPU resource, which is adverse to effective allocation of the physical CPU resources.